Skip to main content

CARDLESS API INTEGRATION.

Overview

This document explains how to integrate the Pine Labs edge payment gateway in seamless mode for cardless flow:

Implementation Details

Below apis need to be integrated:

Edge Seamless Transaction FLow:

*EMI CALCULATOR - V3

*SCHEME VALIDATION - V3

*accept/payment

*process/payment

*OTP/validation

*order/confirmation

API DOMAIN:

UAT: https://uat.pinepg.in/

PROD: https://pinepg.in/

This is a new functionality for CARDLESS SEAMLESS integration here we are going to send PAN numbers for cardless flow and Mobile numbers to do the transaction.

PAN NUMBER should be the last 4 digits numeric number for HDFC and for ICICI it will be 10 digit PAN number must.

1. EMI CALCULATOR:

REQUEST:

{
"merchant_data": {
"merchant_id": 119815,
"merchant_access_code": "0b8453fc-d7a2-4770-91cf-e2e01e6f65dd"
},
"payment_data": {
"amount_in_paisa": 1350000
},
"product_details": [
{
"product_code": "58331",
"product_amount": 1350000
}
]
}

RESPONSE:

{
"issuer": [
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49955,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 77500,
"product_discount": 0,
"subvention_cashback_discount_percentage": 50000,
"product_discount_percentage": 0,
"subvention_type": 1,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 34081
}
],
"emi_scheme": null
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 435527,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 34081,
"total_offerred_discount_cashback_amount": 77500,
"loan_amount": 1272500,
"auth_amount": 1350000
}
],
"issuer_name": "HDFC",
"is_debit_emi_issuer": false
},
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49951,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 70750,
"product_discount": 135000,
"subvention_cashback_discount_percentage": 50000,
"product_discount_percentage": 100000,
"subvention_type": 1,
"additional_cashback": "You are entitled for an additional cashback of Rs.4000 on your card.It will be posted in Customer account within 120 days from the last date of the transaction month on a best effort basis to all open and active card members accounts only has context menu",
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 30646
}
],
"emi_scheme": null
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 391632,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 30646,
"total_offerred_discount_cashback_amount": 205750,
"loan_amount": 1144250,
"auth_amount": 1144250
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49951,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 50500,
"product_discount": 0,
"subvention_cashback_discount_percentage": 30000,
"product_discount_percentage": 0,
"subvention_type": 2,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 61306
}
],
"emi_scheme": null
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 226801,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 61306,
"total_offerred_discount_cashback_amount": 50500,
"loan_amount": 1299500,
"auth_amount": 1350000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49951,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 167500,
"product_discount": 0,
"subvention_cashback_discount_percentage": 50000,
"product_discount_percentage": 0,
"subvention_type": 2,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 80218
}
],
"emi_scheme": null
},
"tenure_id": "9",
"tenure_in_month": "9",
"monthly_installment": 140302,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 80218,
"total_offerred_discount_cashback_amount": 167500,
"loan_amount": 1182500,
"auth_amount": 1350000
}
],
"issuer_name": "HDFC Bank Debit Card",
"is_debit_emi_issuer": true
},
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49815,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 400000,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 36156
}
],
"emi_scheme": null
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 462052,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 36156,
"total_offerred_discount_cashback_amount": 400000,
"loan_amount": 1350000,
"auth_amount": 1350000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49815,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 0,
"product_discount": 200000,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 54254
}
],
"emi_scheme": null
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 200709,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 54254,
"total_offerred_discount_cashback_amount": 200000,
"loan_amount": 1150000,
"auth_amount": 1150000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49815,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 162000,
"product_discount": 0,
"subvention_cashback_discount_percentage": 120000,
"product_discount_percentage": 0,
"subvention_type": 1,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 80595
}
],
"emi_scheme": null
},
"tenure_id": "9",
"tenure_in_month": "9",
"monthly_installment": 140955,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 80595,
"total_offerred_discount_cashback_amount": 162000,
"loan_amount": 1188000,
"auth_amount": 1188000
}
],
"issuer_name": "HDFC CARDLESS",
"is_debit_emi_issuer": true
}
],
"response_code": 1,
"response_message": "SUCCESS"
}

2.SCHEME VALIDATION:

REQUEST:

{
"merchant_data": {
"merchant_id": 119815,
"merchant_access_code": "0b8453fc-d7a2-4770-91cf-e2e01e6f65dd"
},
"payment_data": {
"amount_in_paisa": 1350000
},
"additional_data": {
"mobile_no": "9000315789"
},
"emi_data": {
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49815,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 400000,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 36156
}
],
"emi_scheme": null
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 462052,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 36156,
"total_offerred_discount_cashback_amount": 400000,
"loan_amount": 1350000,
"auth_amount": 1350000
}
}

RESPONSE:

{
"response_code": 1,
"response_message": "SUCCESS"
}

3.ACCEPT PAYMENT:

Accept Payment API:

URI Path: /api/v2/accept/payment Request Response

{
"merchant_data": {
"merchant_id": 119815,
"merchant_access_code": "0b8453fc-d7a2-4770-91cf-e2e01e6f65dd",
"unique_merchant_txn_id": "9791121672004",
"merchant_return_url": "http://192.168.101.205:8002/chargingrespnew.aspx"
},
"payment_data": {
"amount_in_paisa": "1350000"
},
"txn_data": {
"navigation_mode": "7",
"payment_mode": "19",
"transaction_type": "1"
},
"product_details": [
{
"product_code": "58331",
"product_amount": "1350000"
}
]
}

SUCCESS:

200

{
"token": "S01NGe74SgoiKSelEgqLVzBNoeWgNdOnxsPMCjq3IiQsfg%3d",
"response_code": 1,
"response_message": "SUCCESS"
}

FAILURE:

400

{
"response_code": -1,
"response_message": "FAILURE"
}

4.PROCESS PAYMENT:

ProcessPayment API:

URI Path: /api/v2/process/payment?token=2MtDD4%2fmWIBAr1H8h1EKxfjrdHxEca5BhLbdG6wzZbE%3d Request Response

{
"pan_validation": {
"pan_number": "6101"
},
"additional_data": {
"mobile_no": "9000315788"
},
"emi_data": {
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 49815,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "58331",
"product_amount": 1350000,
"subvention_cashback_discount": 400000,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 36156
}
],
"emi_scheme": null
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 462052,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 36156,
"total_offerred_discount_cashback_amount": 400000,
"loan_amount": 1350000,
"auth_amount": 1350000
}
}

SUCCESS:

200

{
"api_url": "http://localhost:51462/api/v2/validate/otp?token=S01NGe74SgoiKSelEgqLVzBNoeWgNdOnxsPMCjq3IiQsfg%3d",
"response_code": 1,
"response_message": "SUCCESS"
}

FAILURE:

400

{
"response_code": -1,
"response_message": "FAILURE"
}

5.OTP VALIDATION:

URI Path: api/v2/validate/otp?token=S01NGe74SgoiKSelEgqLVzBNoeWgNdOnxsPMCjq3IiQsfg%3d Request Response

{
"otp": "123456"
}

SUCCESS:

200

{
"api_url": "http://localhost:51426/api/v2/order/confirmation?token=%2fhm9x4v7J1Zeka4ey1gO8lMcLvMO5LoXpmIDViGhww0%3d",
"validate_otp_response": {
"customer_name": "RAJEEV KUMAR",
"interest_rate": 160000,
"merchant_name": "Aditya Vision",
"total_amount_in_paise": 1350000,
"emi_amount_in_paise": 462053,
"address": "194 - D Motia Khan 3rd FloorRani Jhansi RoXXXXXXXXXXXXXXDELHI110001",
"tenure_in_months": "3",
"last6digitaccountnumber": "018192",
"otp_attempts_left": 0,
"IsMaxAttemptsExcceded": false
},
"response_code": 1,
"response_message": "SUCCESS"
}

FAILURE:

400

{
"response_code": -1,
"response_message": "FAILURE"
}

6.ORDER CONFIRMATION:

URI Path: api/v2/order/confirmation?token=S01NGe74SgoiKSelEgqLVzBNoeWgNdOnxsPMCjq3IiQsfg%3d Request Response

SUCCESS:

200

{
"order_confirmation_response": {
"merchant_id": "119815",
"merchant_access_code": "0b8453fc-d7a2-4770-91cf-e2e01e6f65dd",
"unique_merchant_txn_id": "HDFC_SEAMLESS_001",
"pine_pg_txn_status": "4",
"txn_completion_date_time": "17/08/2023 08:34:23 PM",
"amount_in_paisa": "1350000",
"txn_response_code": "1",
"txn_response_msg": "SUCCESS",
"acquirer_name": "HDFCDebitEMI-CARDLESS",
"pine_pg_transaction_id": "7786655",
"emi_tenure_month": "3",
"emi_interest_rate_percent": "16.00",
"emi_principal_amount_in_paisa": "1350000",
"emi_amount_payable_each_month_in_paisa": "462052",
"product_code": "58331",
"is_brand_emi_txn": "1",
"captured_amount_in_paisa": "1350000",
"refund_amount_in_paisa": "0",
"emi_cashback_type": "2",
"emi_issuer_discount_cashabck_perecent": "0.00",
"emi_issuer_discount_cashback_fixed_amount_in_paisa": "0",
"emi_merchant_discount_cashabck_perecent": "0.00",
"emi_merchant_discount_cashback_fixed_amount_in_paisa": "80000",
"emi_total_discount_cashback_percent": "0.00",
"emi_total_discount_cashabck_amount_in_paisa": "400000",
"payment_mode": "CARDLESSEMI"
},
"response_code": 1,
"response_message": "SUCCESS"
}

FAILURE:

400

{
"response_code": -1,
"response_message": "FAILURE"
}